package com.yhq.spring.web.controller;

import lombok.Data;

@Data
public class PlainResult {

    private int code;

    private String msg;

    private String data;

    public PlainResult(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public PlainResult(int code, String msg,String data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public static PlainResult success() {
        return new PlainResult(200, "success");
    }

    public static PlainResult success(String data) {
        return new PlainResult(200, "success",data);
    }

}
